Dynomotion

Group: DynoMotion Message: 12919 From: daveymahomh600e Date: 3/8/2016
Subject: Interpreting Kanalog ADC Values
Hi Tom,

I am trying to understand how to interpret ADC input values for a Kanalog card. Is there a formula for converting the value? For example the Analog I/O screen shows ADC #0  340=1.660 volts. I need to monitor the input and was wondering if it is best to use the 340 value, or the voltage value?

Thank you,
David.


Group: DynoMotion Message: 12922 From: Tom Kerekes Date: 3/8/2016
Subject: Re: Interpreting Kanalog ADC Values
Hi David,

Its entirely up to you.  I would think Volts are about as arbitrary units as counts in your case.  More relevant units for you might be units of torque(oz-in) or force (lbs).

Using counts would be faster and involve a few less calculations but this is likely to be insignificant.

The PC-DSP.h file has C Macros to help converting to Volts.

// Macros to convert Kanalog DAC/ADC settings to/from Volts

#define KANALOG_CONVERT_DAC_TO_VOLTS(x)  ((x)*(-10.0f/2048.0f))
#define KANALOG_CONVERT_ADC_TO_VOLTS(x)  ((x)*( 10.0f/2048.0f))

HTH
Regards
TK


On 3/8/2016 9:10 AM, david.m.stevenson@... [DynoMotion] wrote:
 

Hi Tom,

I am trying to understand how to interpret ADC input values for a Kanalog card. Is there a formula for converting the value? For example the Analog I/O screen shows ADC #0  340=1.660 volts. I need to monitor the input and was wondering if it is best to use the 340 value, or the voltage value?

Thank you,
David.



Group: DynoMotion Message: 12923 From: David Stevenson Date: 3/8/2016
Subject: Re: Interpreting Kanalog ADC Values
Hi Tom,

Thanks for that information. You're right that torque or force is a better fit for my application. I had a formula within a program and was surprised to see it return a value up in the 300's! I guess the raw input data is in counts?

Regards,
David.

On 3/8/2016 2:54 PM, Tom Kerekes tk@... [DynoMotion] wrote:
 

Hi David,

Its entirely up to you.  I would think Volts are about as arbitrary units as counts in your case.  More relevant units for you might be units of torque(oz-in) or force (lbs).

Using counts would be faster and involve a few less calculations but this is likely to be insignificant.

The PC-DSP.h file has C Macros to help converting to Volts.

// Macros to convert Kanalog DAC/ADC settings to/from Volts

#define KANALOG_CONVERT_DAC_TO_VOLTS(x)  ((x)*(-10.0f/2048.0f))
#define KANALOG_CONVERT_ADC_TO_VOLTS(x)  ((x)*( 10.0f/2048.0f))

HTH
Regards
TK


On 3/8/2016 9:10 AM, david.m.stevenson@... [DynoMotion] wrote:
 

Hi Tom,

I am trying to understand how to interpret ADC input values for a Kanalog card. Is there a formula for converting the value? For example the Analog I/O screen shows ADC #0  340=1.660 volts. I need to monitor the input and was wondering if it is best to use the 340 value, or the voltage value?

Thank you,
David.





This email has been sent from a virus-free computer protected by Avast.
www.avast.com